<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>3.5. How to migrate Capella projects</title>
		<link type="text/css" rel="stylesheet" href="PLUGINS_ROOT/org.polarsys.capella.doc/html/styles.css"/>
	</head>
	<body>
		<h1 id="How_to_Migrate_Capella_Project">How to Migrate Capella Project</h1>
		<p>When upgrading to a new Capella product, your older models may not be compatible right away with this new version.
			In order to facilitate this transition, Capella offers a migration feature that allows you to migrate your models.</p>
		<p>The migrated projects 
			<b>are not backwards compatible</b>. This means that once they are migrated to the new version, they 
			<b>can not</b> be opened with the previous Capella versions. 
		</p>
		<p>A Capella version ensures project migration of model coming from at least the previous major release versions and if any, from previous patches of the current version. (For instance, Capella 7.x version will be able to migrate models coming from previous major release versions (any 6.x) and previous patches of the current version). Capella 7.x also allows migration from models coming from version 1.4.x. If your model is too old, then you will have to install an intermediate Capella release to perform the migration.</p>
		<p>We strongly recommend that you baseline your model in a version control system before performing the migration operation. Once this is done please continue with the following migration steps:</p>
		<ol>
			<li>Migrate any libraries towards which you model has any dependencies. If your libraries have dependencies towards other libraries then they must be migrated first. You should start your migration process with the library that has no external dependencies, and continue progressively to the top dependency.</li>
			<li>Migrate your projects.</li>
		</ol>
		<p>In order to launch the migration process of a Capella Project you must right click on the <u>
			<b>project</b></u> and choose 
			<i>Migration &gt; Migrate Project toward current version</i>. The same steps apply to libraries as well.
		</p>
		<p>
			<img border="0" src="Images/3.5.%20How%20to%20migrate%20Melody%20Advance%20projects_html_m55692da5.png"/>
		</p>
		<p>The displayed dialog allows you to to make a versioned backup (baseline) of the model before running the migration.
			These backup files will allow you to recover your model in case of any migration problems, even if the model is not managed in a source control system. </p>
		<p>We highly advise you to enable the option &ldquo;Backup models before the migration&rdquo;.</p>
		<p>
			<img border="0" src="Images/3.5.%20How%20to%20migrate%20Melody%20Advance%20projects_html_m381b2efb.png"/>
		</p>
		<p>Some additional migration commands are available on semantic and diagram files allowing advanced migration processes by triggering a migration on each of these files kind separately. For more details see the 
			<a href="/wiki/../help/topic/org.polarsys.capella.preferences.doc/html/06.%20Preferences/6.4.%20Commands%20preferences.html?cp=6_1_21_1_11_0_0" title="../help/topic/org.polarsys.capella.preferences.doc/html/06.%20Preferences/6.4.%20Commands%20preferences.html?cp=6_1_21_1_11_0_0">Commands &amp; User Profiles</a> <span class="github-link">
			<a href="/wiki/../../../org.polarsys.capella.preferences.doc/html/06._Preferences/6.4._Commands_preferences.mediawiki" title="../../../org.polarsys.capella.preferences.doc/html/06. Preferences/6.4. Commands preferences.mediawiki">(online documentation)</a></span> section.
		</p>
		<p>
			<br/>

			<br/>
		</p>
		<table border="1">
			<tr>
				<td>
					<p>
						<img height="48" width="48" border="0" src="Images/3.5.%20How%20to%20migrate%20Melody%20Advance%20projects_html_3c78e109.png"/>
					</p>
				</td>
				<td>
					<p>At the end of the migration process, we recommend you to run a manual global refresh on all the diagrams of the migrated project. For more details see the 
						<a href="/wiki/../help/topic/org.polarsys.capella.ui.doc/html/05.%20Diagram%20Management/5.1.%20Diagram%20concepts.html?cp=6_1_6_0_1#Diagram_Refreshing_Strategies" title="../help/topic/org.polarsys.capella.ui.doc/html/05.%20Diagram%20Management/5.1.%20Diagram%20concepts.html?cp=6_1_6_0_1#Diagram_Refreshing_Strategies">Diagram Refreshing Strategies</a> <span class="github-link">
						<a href="/wiki/../../../org.polarsys.capella.ui.doc/html/05._Diagram_Management/5.1._Diagram_concepts.mediawiki#Diagram_Refreshing_Strategies" title="../../../org.polarsys.capella.ui.doc/html/05. Diagram Management/5.1. Diagram concepts.mediawiki#Diagram_Refreshing_Strategies">(online documentation)</a></span> section.
					</p>
				</td>
			</tr>
		</table>
		<h2 id="Migration_of_models_containing_legacy_Capella_requirements">Migration of models containing legacy Capella requirements</h2>
		<p>For legacy models coming from older Capella releases that includes such legacy Capella requirements, you have to either: </p>
		<ul>
			<li>install the new addon <b>Basic Requirement</b> first and then run a standard project migration</li>
			<li>detach the legacy requirements if they are not used, using model detachment (see 
				<a href="/wiki/../help/topic/org.polarsys.capella.ui.doc/html/First%20steps%20with%20Capella/3.6.%20How%20to%20detach%20viewpoints.html" title="../help/topic/org.polarsys.capella.ui.doc/html/First%20steps%20with%20Capella/3.6.%20How%20to%20detach%20viewpoints.html">How to detach viewpoints</a>) or continue to use this new addon to exploit the legacy requirements.
			</li>
		</ul>
		<h2 id="Special_attention_to_image_used_in_the_project">Special attention to image used in the project</h2>
		<p>When doing the migration, the image that were previously used with absolute path will be copied into the project in the workspace.
			The "Error log" view will log the images that have not been found.</p>
		<p>Then you can start the validation, and the 
			<a href="/wiki/../help/topic/org.polarsys.capella.validation.doc/html/Validation%20Rules/integrity/ValidationRules.html" title="../help/topic/org.polarsys.capella.validation.doc/html/Validation%20Rules/integrity/ValidationRules.html">I_46 and I_47 constraints</a> will check that the images are reachable. The quick fix allows to select a new image among the available one in the workspace.
		</p>
		<p>But before fixing the path to the image one by one, check that the set of images are properly located where it is supposed to be.
			Then you can restart the migration to properly copy the image from the full path location to the relative workspace path</p>
		<h3 id="How_to_properly_migrate_images">How to properly migrate images</h3>
		<p>As usual, and not specifically for the images, prefer starting the migration by the Capella libraries. The image migration process is the same for the Capella libraries and for the Capella project.</p>
		<p>Most of the attention points are 
			<b>specific</b> to the migration towards 
			<b>Capella 6.0.0</b>.
		</p>
		<p>Nevertheless, 
			<b>the migration error log messages, the usage of the validation and the quick fixes will remain useful after 6.0.0</b>
		</p>
		<p>1- Before starting the migration, make sure that the images, that are referenced by the Capella/aird model in the description tab, are at the proper location. The reference may be either an absolute path (used in 5.2.x) or a project relative path.</p>
		<p>2- Start the Capella migration</p>
		<ul>
			<li>old base64 encoded images are converted into an image in the workspace (5.2.x to 6.x migration)</li>
			<li>old "absolute path" image are copied in the workspace (5.2.x to 6.x migration)</li>
			<li>old project relative path are made workspace relative (5.2.x to 6.x migration)</li>
		</ul>
		<p>-&gt; check the error log to see information or errors about images</p>
		<p>3- (optional) you may restart 1-2 steps if needed.</p>
		<p>4- Make sure 
			<a href="/wiki/../help/topic/org.polarsys.capella.validation.doc/html/Validation%20Rules/integrity/ValidationRules.html" title="../help/topic/org.polarsys.capella.validation.doc/html/Validation%20Rules/integrity/ValidationRules.html">I_46 and I_47 constraints</a> are checked according to your needs.
		</p>
		<p>5- Start validation on the root Capella element.</p>
		<p>6- Open "Information" view and check the errors about the image. (The messages start by "(Image)")</p>
		<p>7- You may consider to 1-2 steps again</p>
		<p>8- You can repair the image paths using the quick fix on the markers. It will allow to select a new image.</p>
		<p>In addition, consider using a versioning tool like Git to be sure to save the whole content of the workspace including the libraries and the contained images.</p>
		<h2 id="Project_migration_in_command_line">Project migration in command line</h2>
		<p>Please refer to the document at 
			<a href="/wiki/../help/topic/org.polarsys.capella.commandline.doc/html/19.%20Command%20Line%20Support/19.1.%20Core%20Mechanism%20and%20Applications.html?cp=6_1_13_1_3#Migration" title="../help/topic/org.polarsys.capella.commandline.doc/html/19.%20Command%20Line%20Support/19.1.%20Core%20Mechanism%20and%20Applications.html?cp=6_1_13_1_3#Migration">Migration command line</a> <span class="github-link">
			<a href="/wiki/../../../org.polarsys.capella.commandline.doc/html/19._Command_Line_Support/19.1._Core_Mechanism_and_Applications.mediawiki#Migration" title="../../../org.polarsys.capella.commandline.doc/html/19. Command Line Support/19.1. Core Mechanism and Applications.mediawiki#Migration">(online documentation)</a></span> for more details about launching project migration in command line.
			An example of how to migrate projects in batch mode can be found at 
			<a href="/wiki/../help/topic/org.polarsys.capella.commandline.doc/html/19.%20Command%20Line%20Support/19.2.%20Migration%20and%20Post-Migration%20script%20example.html?cp=6_1_13_2" title="../help/topic/org.polarsys.capella.commandline.doc/html/19.%20Command%20Line%20Support/19.2.%20Migration%20and%20Post-Migration%20script%20example.html?cp=6_1_13_2">Migration command line in batch mode</a> <span class="github-link">
			<a href="/wiki/../../../org.polarsys.capella.commandline.doc/html/19._Command_Line_Support/19.2._Migration_and_Post-Migration_script_example.mediawiki" title="../../../org.polarsys.capella.commandline.doc/html/19. Command Line Support/19.2. Migration and Post-Migration script example.mediawiki">(online documentation)</a></span>.
		</p>
	</body>
</html>